package com.itshare.video.common.crud;

import java.util.List;

/**
 * 这个接口未来将用于自己的代码模板
 * @Author lyr
 * @create 2020/9/16 20:54
 */
@Deprecated
public interface BaseService<PO,POExample,ID> {


    int deleteByExample(POExample example);

    long countByExample(POExample example);

    int deleteByPrimaryKey(ID primaryKey);

    int insert(PO record);

    int insertSelective(PO record);

    PO selectByPrimaryKey(ID pk);

    List<PO> selectByExampleForPage(POExample example, Integer page, Integer size);

    List<PO> selectByExample(POExample example);

    int updateByPrimaryKeySelective(PO record);

    int updateByPrimaryKey(PO record);
    int updateByExampleSelective(PO record, POExample example);

    int updateByExample(PO record, POExample example);

    /**
     * 插入或者更新
     * @param record 记录
     */
    void insertOrUpdate(PO record);

}
